{php}$time=time();{/php}
{qb:hy name="zhibo_fav_btn" type="cms" mid="3" where="status>0&zhibo_status=1&uid=$info.uid&start_time>$time" rows="1" conf='model_style/default/zhibo_order.php'}

{php}
if($i>1)break;
{/php}
<style type="text/css">
.zhibo_order{
	background:{$_cfg.bgcolor?:'#f9f9f9'};
	border-radius:5px;
	margin-bottom:10px;
	padding-top:10px;
	padding-left:15px;
	border:1px solid {$_cfg.bordercolor?:'#e8e8e8'};
}
.zhibo_order .ctitle{
	font-size:17px;
	font-weight:bold;
}
.zhibo_order .cmore{
	position:relative;
	height:80px;
}
.zhibo_order .cmore .user_icon{
	position:absolute;
	width:60px;
	height:60px;
	border-radius:100%;
	object-fit: cover;
	left:0;
	top:10px;
}
.zhibo_order .cmore .user_info{
	font-size:15px;
	position:absolute;
	left:80px;
	bottom:12px;
}
.zhibo_order .cmore .user_info .time{
	margin-left:18px;
}
.zhibo_order .cmore .guanzhu_zhibo{
	position: absolute;
    top: 10px;
    cursor: pointer;
    right: 20px;
    width: 166px;
    height: 34px;
    border-radius: 17px;
    background-image: -moz-linear-gradient( 0deg, rgb(255,151,58) 0%, rgb(255,98,37) 100%);
    background-image: -webkit-linear-gradient( 0deg,rgb(255,151,58) 0%, rgb(255,98,37) 100%);
    background-image: -ms-linear-gradient( 0deg, rgb(255,151,58) 0%, rgb(255,98,37) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr = #ff963a, endColorstr = #ff6325);
    color: #fff;
    text-align: center;
    font-size: 14px;
    padding: 5px 0 5px 20px;
    box-sizing: border-box;
}

.zhibo_order .cmore .guanzhu_zhibo em {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: url(__STATIC__/images/ic_fol.png) no-repeat;
    background-size: contain;
    position: absolute;
    top: 3px;
    left: 3px;
}
.zhibo_order .cmore .guanzhu_zhibo span.num {
    margin-left: 36px;
    position: relative;
}
.zhibo_order .cmore .guanzhu_zhibo span.num:before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 10px;
    background: #ffc89f;
    position: absolute;
    left: -19px;
    top: 5px;
}

.zhibo_order .cmore .zb_info{
	position:absolute;
	left:80px;
	top:15px;
	font-size:15px;
	background:{$_cfg.timecolor?:'green'};
	color:#fff;
	padding:2px 10px;
	border-radius:3px;
}
.zhibo_order .user_info > div{
	float:left;
}
.zhibo_order .user_info > div:first-child{
	padding-top:3px;
	margin-right:10px;
}
.zhibo_order .user_info .fav_user{
	height:20px;
	overflow:hidden;
}
@media (max-width: 600px) {
	.zhibo_order .cmore{
		height:130px;
	}
	.zhibo_order .cmore .guanzhu_zhibo{
		top: 55px;
	}
	.zhibo_order .cmore .user_info{
		left:10px;
	}
	.zhibo_order .cmore .guanzhu_zhibo {
		right:0px;
		left:100px;
	}
}

@media (max-width: 350px) {
	.zhibo_order .cmore .user_icon{
		display:none;
	}
	.zhibo_order .cmore .zb_info{
		left:10px;
	}
}
</style>
<div class="zhibo_order">
	<div class="ctitle"><a href="{$rs.url}" target="_blank">{$rs.title}</a></div>
	<div class="cmore">
		<a href="{:get_url('user',$rs.uid)}" target="_blank"><img class="user_icon" src="{:get_user_icon($rs.uid)}" onerror="this.src='__STATIC__/imagse/nopic.png'"></a>		
		<div class="zb_info"><i class="time si si-speedometer"></i> 直播开始时间 {:format_time($rs.start_time)}</div>
		<div class="user_info">
			<div class="fa fa-bullhorn"> 已预约用户</div> 
			<div class="fav_user">
				<ul>
				{if plugins_config('fav')}
					{volist name=":query('fav',['rows'=>20,'where'=>['aid'=>$rs['id'],'sysid'=>modules_config('cms')['id']]])" id="us"}
					<li><a href="{:get_url('user',$us.uid)}" target="_blank">{:get_user_name($us.uid)}</a>　<i class="si si-clock"></i> {:format_time($us.create_time)}</li>
					{/volist}
				{else /}
				系统没安装收藏夹插件
				{/if}
				</ul>
			</div>			
		</div>
		<a href="javascript:"><div class="guanzhu_zhibo" data-id="{$rs.id}" data-time="{:intval($_cfg.order_time?:0)*60}"><em></em><span class="txt"> 预约</span><span class="num">{if plugins_config('fav')} {:query('fav',['count'=>'id','where'=>['aid'=>$rs['id'],'sysid'=>modules_config('cms')['id']]])}人 {/if}</span></div></a>
	</div>
</div>


<script type="text/javascript">
function fav_Scroll(obj){  
	$(obj).find("ul").animate({  
		marginTop : "-20px"  
	},1000,function(){  
		$(this).css({marginTop : "0px"}).find("li:first").appendTo(this);  
	})  
}
$(function(){   
	var scroll = setInterval('fav_Scroll(".fav_user")',2000);
    $(".fav_user").hover(function(){
		clearInterval(scroll);
	},function(){
		scroll = setInterval('fav_Scroll(".fav_user")',2000);
	});

	$(".guanzhu_zhibo").click(function(){
		$.get("{:urls('cms/wxapp.live/fav')}?id="+$(this).data('id')+"&time="+$(this).data('time'),function(res){
			if(res.code==0){
				layer.msg("预约成功");
			}else{
				layer.alert(res.msg);
			}
		});
	});
});
</script>
{/qb:hy}
<a class="taglabel"><!--不给复制--></a>